<?php

include("modules/downloads/global.php");

$pagetitle=" - Downloads";
$links=" > Downloads";

include("header.php");

print template('tableheader');
print "<tr>";
print "<td class=\"tableheadercell\" width=\"50%\">";
print "<span class=\"textheader\">";
print "<b>File</b>";
print "</span>";
print "</td>";
print "<td class=\"tableheadercell\" width=\"50%\">";
print "<span class=\"textheader\">";
print "<b>Size</b>";
print "</span>";
print "</td>";
print "</tr>";

$downloadsarray=listfilesext("downloads");
@rsort($downloadsarray);

for($m=0;$m<count($downloadsarray);$m++){

	print "<tr>";
	print "<td class=\"tablecell2\">";
	print "<span class=\"textlarge\">";
	print "<a href=\"downloads/$downloadsarray[$m]\">$downloadsarray[$m]</a>";
	print "</span>";
	print "</td>";
	print "<td class=\"tablecell1\">";
	print "<span class=\"textlarge\">";
	$size=@filesize("downloads/$downloadsarray[$m]");
	$size=round($size/1024,2);
	if($size>0){
		print "<b>$size</b> kb";
	}else{
		print "0";
	}
	print "</span>";
	print "</td>";
	print "</tr>";

}

print "</table><br><br>";

require ("footer.php");
?>
